package com.mbigger.redis.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.SetOperations;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RedisController {
    
    @Autowired
    private RedisTemplate<String, String> redisTemplate;
    
    @GetMapping("write")
    public void write() {
        SetOperations<String, String> setOperations = redisTemplate.opsForSet();
        setOperations.add("setme", "1122");
    }
}
